You can integrate the Ditto SDK with your web and Node.js projects developed using JavaScript and TypeScript languages.
@dittolive/ditto
package into your project:
appID
placeholder value with the app ID that identifies your app in Ditto.
token
placeholder value with your playground token that the Big Peer uses to verify your digital identity before issuing your playground certificate.
Ditto
instance in the top-most scope of your app. Otherwise, it may be inadvertently garbage collected and no longer accessible throughout the lifecycle of your app.registerSubscription()
in the ditto.sync
namespace to add a sync subscription:
registerObserver()
method on ditto.store
. The passed in callback closure is invoked by Ditto everytime it registers new changes to documents matching the query.